xenstore: use temporary memory context for firing watches
authorJuergen Gross <jgross@suse.com>
Tue, 19 Jul 2016 11:30:46 +0000 (13:30 +0200)
committerWei Liu <wei.liu2@citrix.com>
Tue, 19 Jul 2016 11:56:59 +0000 (12:56 +0100)
commitd5052ad6154256455aa2f9a603103ede61dae4b1
treee0a7569c1d75c64b4c817a8430b1e82a16ece0e0
parentab32687503e054a72ebcede9b7aa34ef856634f6
xenstore: use temporary memory context for firing watches

Use a temporary memory context for memory allocations when firing
watches. This will avoid leaking memory in case of long living
connections and/or xenstore entries.

This requires adding a new parameter to fire_watches() and add_event()
to specify the memory context to use for allocations.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/xenstore/xenstored_core.c
tools/xenstore/xenstored_domain.c
tools/xenstore/xenstored_transaction.c
tools/xenstore/xenstored_watch.c
tools/xenstore/xenstored_watch.h